package domain.worm;

import com.uqbar.vainilla.DeltaState;

public class StateFalling extends WormState {

	public StateFalling(Worm worm) {
		super(worm);

	}

	@Override
	public void update(DeltaState deltaState) {
		if(!this.getWorm().fall(deltaState)){
			this.getWorm().setState(new StandbyState(this.getWorm()));
		}else{
			this.getWorm().setAppearance(this.getWorm().getFallAnimation());
		}
	}

	
}
